package jwr.basic;

public class Ch04_Q3_v2 {

	public static void main(String[] args) {
		WineV2 wn = new WineV2("경영기술개발원","조우람","한국","서울","와인",1999,1);
		System.out.println(wn.toString());
		
	}//main

}//class

class WineV2{
	private String manufacturer, name, country, regin, kind;
	private int year, grade;
	public WineV2(String manufacturer,String name, String country, String regin, String kind,int year, int grade) {
		this.manufacturer = manufacturer;
		this.name = name; 
		this.country = country;
		this.regin = regin;
		this.kind = kind;
		this.year = year;
		this.grade = grade;
	}
	public WineV2(String manufacturer, String name){
		this.manufacturer = manufacturer;
		this.name = name;
	}
	public void setWine(String manufacturer,String name, String country, String regin, String kind,int year, int grade){
		this.manufacturer = manufacturer;
		this.name = name; 
		this.country = country;
		this.regin = regin;
		this.kind = kind;
		this.year = year;
		this.grade = grade;
	}
	public void setWine(String manufacturer, String name){
		this.manufacturer = manufacturer;
		this.name = name;
		
	}
	@Override
	public String toString() {
		String result;
		result = "manufacturer : "+ manufacturer; //제조사
		result += "\nname : "+ name; //와인이름
		result += "\ncountry : "+ country; //나라
		result += "\nregin : "+ regin; //도시
		result += "\nkind : "+ kind; //종류
		result += "\nyear : "+ year; // 몇년 산
		result += "\ngrade : "+ grade; // 등급
		
		return result;
	}
	
}